webserver: webserver.o socketlistener.o request.o requesthandler.o
	g++ $(CFLAGS) webserver.o socketlistener.o request.o requesthandler.o -o webserver -lutil -lssl

webserver.o: webserver.cpp webserver.h socketlistener.h request.h requesthandler.h
	g++ $(CFLAGS) webserver.cpp -c

socketlistener.o: socketlistener.cpp webserver.h socketlistener.h request.h
	g++ $(CFLAGS) socketlistener.cpp -c

request.o: request.cpp webserver.h request.h socketlistener.h
	g++ $(CFLAGS) request.cpp -c

requesthandler.o: requesthandler.cpp webserver.h requesthandler.h request.h
	g++ $(CFLAGS) requesthandler.cpp -c

clean:
	rm -f *.o webserver
